const TOKEN_NAME = 'hm-news-token'

export const setStorageToken = (token) => {
  localStorage.setItem(TOKEN_NAME, JSON.stringify(token))
}

export const removeStorageToken = () => {
  localStorage.removeItem(TOKEN_NAME)
}

export const getStorageToken = () => {
  return JSON.parse(localStorage.getItem(TOKEN_NAME)) || {}
}

export const setStroagechannel = (payload) => {
  localStorage.setItem('channelist', JSON.stringify(payload))
}
